diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php
new file mode 100644
index 0000000..3b7dcc6
--- /dev/null
+++ b/system/libraries/Javascript.php
@@ -0,0 +1,847 @@
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+
+
+
+class CI_Javascript {
+
+	var $_javascript_location = 'js';
+
+	function CI_Javascript($params = array())
+	{
+		$defaults = array('js_library_driver' => 'jquery', 'autoload' => TRUE);
+		
+		foreach ($defaults as $key => $val)
+		{
+			if (isset($params[$key]) && $params[$key] !== "")
+			{
+				$defaults[$key] = $params[$key];
+			}
+		}
+		
+		extract($defaults);
+
+		$this->CI =& get_instance();
+
+		// load the requested js library
+		$this->CI->load->library($js_library_driver, array('autoload' => $autoload));
+		// make js to refer to current library
+		$this->js =& $this->CI->$js_library_driver;
+		
+		log_message('debug', "Javascript Class Initialized and loaded.  Driver used: $js_library_driver");
+	}
+
+	// --------------------------------------------------------------------	 
+	// Event Code
+	// --------------------------------------------------------------------	
+
+	/**
+	 * Blur
+	 *
+	 * Outputs a javascript library blur event
+	 *
+	 * @access	public
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function blur($element = 'this', $js = '')
+	{
+		return $this->js->_blur($element, $js);
+	}
+	
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Change
+	 *
+	 * Outputs a javascript library change event
+	 *
+	 * @access	public
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function change($element = 'this', $js = '')
+	{
+		return $this->js->_change($element, $js);
+	}
+	
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Click
+	 *
+	 * Outputs a javascript library click event
+	 *
+	 * @access	public
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @param	boolean	whether or not to return false
+	 * @return	string
+	 */
+	function click($element = 'this', $js = '', $ret_false = TRUE)
+	{
+		return $this->js->_click($element, $js, $ret_false);
+	}
+
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Double Click
+	 *
+	 * Outputs a javascript library dblclick event
+	 *
+	 * @access	public
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function dblclick($element = 'this', $js = '')
+	{
+		return $this->js->_dblclick($element, $js);
+	}
+
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Error
+	 *
+	 * Outputs a javascript library error event
+	 *
+	 * @access	public
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function error($element = 'this', $js = '')
+	{
+		return $this->js->_error($element, $js);
+	}
+
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Focus
+	 *
+	 * Outputs a javascript library focus event
+	 *
+	 * @access	public
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function focus($element = 'this', $js = '')
+	{
+		return $this->js->__add_event($focus, $js);
+	}
+
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Hover
+	 *
+	 * Outputs a javascript library hover event
+	 *
+	 * @access	public
+	 * @param	string	- element
+	 * @param	string	- Javascript code for mouse over
+	 * @param	string	- Javascript code for mouse out
+ 	 * @return	string
+	 */
+	function hover($element = 'this', $over, $out)
+	{
+		return $this->js->__hover($element, $over, $out);
+	}
+
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Keydown
+	 *
+	 * Outputs a javascript library keydown event
+	 *
+	 * @access	public
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function keydown($element = 'this', $js = '')
+	{
+		return $this->js->_keydown($element, $js);
+	}
+
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Keyup
+	 *
+	 * Outputs a javascript library keydown event
+	 *
+	 * @access	public
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function keyup($element = 'this', $js = '')
+	{
+		return $this->js->_keyup($element, $js);
+	}	
+
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Load
+	 *
+	 * Outputs a javascript library load event
+	 *
+	 * @access	public
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function load($element = 'this', $js = '')
+	{
+		return $this->js->_load($element, $js);
+	}	
+	
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Mousedown
+	 *
+	 * Outputs a javascript library mousedown event
+	 *
+	 * @access	public
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function mousedown($element = 'this', $js = '')
+	{
+		return $this->js->_mousedown($element, $js);
+	}
+
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Mouse Out
+	 *
+	 * Outputs a javascript library mouseout event
+	 *
+	 * @access	public
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function mouseout($element = 'this', $js = '')
+	{
+		return $this->js->_mouseout($element, $js);
+	}
+
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Mouse Over
+	 *
+	 * Outputs a javascript library mouseover event
+	 *
+	 * @access	public
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function mouseover($element = 'this', $js = '')
+	{
+		return $this->js->_mouseover($element, $js);
+	}
+
+	// --------------------------------------------------------------------
+
+	/**
+	 * Mouseup
+	 *
+	 * Outputs a javascript library mouseup event
+	 *
+	 * @access	public
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function mouseup($element = 'this', $js = '')
+	{
+		return $this->js->_mouseup($element, $js);
+	}
+
+	// --------------------------------------------------------------------
+
+	/**
+	 * Output
+	 *
+	 * Outputs the called javascript to the screen
+	 *
+	 * @access	public
+	 * @param	string	The code to output
+	 * @return	string
+	 */
+	function output($js)
+	{
+		return $this->js->_output($js);
+	}
+
+	// --------------------------------------------------------------------
+
+	/**
+	 * Ready
+	 *
+	 * Outputs a javascript library mouseup event
+	 *
+	 * @access	public
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function ready($js)
+	{
+		return $this->js->_document_ready($js);
+	}
+
+	// --------------------------------------------------------------------
+
+	/**
+	 * Resize
+	 *
+	 * Outputs a javascript library resize event
+	 *
+	 * @access	public
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function resize($element = 'this', $js = '')
+	{
+		return $this->js->_resize($element, $js);
+	}
+
+	// --------------------------------------------------------------------
+
+	/**
+	 * Scroll
+	 *
+	 * Outputs a javascript library scroll event
+	 *
+	 * @access	public
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function scroll($element = 'this', $js = '')
+	{
+		return $this->js->_scroll($element, $js);
+	}
+	
+	// --------------------------------------------------------------------
+
+	/**
+	 * Unload
+	 *
+	 * Outputs a javascript library unload event
+	 *
+	 * @access	public
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function unload($element = 'this', $js = '')
+	{
+		return $this->js->_unload($element, $js);
+	}
+
+	// --------------------------------------------------------------------	 
+	// Effects
+	// --------------------------------------------------------------------	
+
+
+	/**
+	 * Add Class
+	 *
+	 * Outputs a javascript library addClass event
+	 *
+	 * @access	public
+	 * @param	string	- element
+	 * @param	string	- Class to add
+ 	 * @return	string
+	 */
+	function addClass($element = 'this', $class = '')
+	{
+		return $this->js->_addClass($element, $class);
+	}
+
+	// --------------------------------------------------------------------	
+
+	/**
+	 * Animate
+	 *
+	 * Outputs a javascript library animate event
+	 *
+	 * @access	public
+	 * @param	string	- element
+	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
+	 * @param	string	- Javascript callback function
+ 	 * @return	string
+	 */
+	function animate($element = 'this', $params = array(), $speed = '', $extra = '')
+	{
+		return $this->js->_animate($element, $params, $speed, $extra);
+	}
+
+	// --------------------------------------------------------------------
+		
+	/**
+	 * Fade In
+	 *
+	 * Outputs a javascript library hide event
+	 *
+	 * @access	public
+	 * @param	string	- element
+	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
+	 * @param	string	- Javascript callback function
+ 	 * @return	string
+	 */
+	function fadeIn($element = 'this', $speed = '', $callback = '')
+	{
+		return $this->js->_fadeIn($element, $speed, $callback);
+	}
+		
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Fade Out
+	 *
+	 * Outputs a javascript library hide event
+	 *
+	 * @access	public
+	 * @param	string	- element
+	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
+	 * @param	string	- Javascript callback function
+ 	 * @return	string
+	 */
+	function fadeOut($element = 'this', $speed = '', $callback = '')
+	{
+		return $this->js->_fadeOut($element, $speed, $callback);
+	}
+	// --------------------------------------------------------------------
+		
+	/**
+	 * Slide Up
+	 *
+	 * Outputs a javascript library slideUp event
+	 *
+	 * @access	public
+	 * @param	string	- element
+	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
+	 * @param	string	- Javascript callback function
+ 	 * @return	string
+	 */
+	function slideUp($element = 'this', $speed = '', $callback = '')
+	{
+		return $this->js->_slideUp($element, $speed, $callback);
+
+	}
+		
+	// --------------------------------------------------------------------
+
+	/**
+	 * Remove Class
+	 *
+	 * Outputs a javascript library removeClass event
+	 *
+	 * @access	public
+	 * @param	string	- element
+	 * @param	string	- Class to add
+ 	 * @return	string
+	 */
+	function removeClass($element = 'this', $class = '')
+	{
+		return $this->js->_removeClass($element, $class);
+	}
+
+	// --------------------------------------------------------------------	
+	
+	/**
+	 * Slide Down
+	 *
+	 * Outputs a javascript library slideDown event
+	 *
+	 * @access	public
+	 * @param	string	- element
+	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
+	 * @param	string	- Javascript callback function
+ 	 * @return	string
+	 */
+	function slideDown($element = 'this', $speed = '', $callback = '')
+	{
+		return $this->js->_slideDown($element, $speed, $callback);
+	}
+
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Slide Toggle
+	 *
+	 * Outputs a javascript library slideToggle event
+	 *
+	 * @access	public
+	 * @param	string	- element
+	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
+	 * @param	string	- Javascript callback function
+ 	 * @return	string
+	 */
+	function slideToggle($element = 'this', $speed = '', $callback = '')
+	{
+		return $this->js->_slideToggle($element, $speed, $callback);
+
+	}
+		
+	// --------------------------------------------------------------------
+
+	/**
+	 * Hide
+	 *
+	 * Outputs a javascript library hide action
+	 *
+	 * @access	public
+	 * @param	string	- element
+	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
+	 * @param	string	- Javascript callback function
+ 	 * @return	string
+	 */
+	function hide($element = 'this', $speed = '', $callback = '')
+	{
+		return $this->js->_hide($element, $speed, $callback);
+	}
+	
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Toggle
+	 *
+	 * Outputs a javascript library toggle event
+	 *
+	 * @access	public
+	 * @param	string	- element
+ 	 * @return	string
+	 */
+	function toggle($element = 'this')
+	{
+		return $this->js->_toggle($element);
+
+	}
+	
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Toggle Class
+	 *
+	 * Outputs a javascript library toggle class event
+	 *
+	 * @access	public
+	 * @param	string	- element
+ 	 * @return	string
+	 */
+	function toggleClass($element = 'this', $class='')
+	{
+		return $this->js->_toggleClass($element, $class);
+	}
+	
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Show
+	 *
+	 * Outputs a javascript library show event
+	 *
+	 * @access	public
+	 * @param	string	- element
+	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
+	 * @param	string	- Javascript callback function
+ 	 * @return	string
+	 */
+	function show($element = 'this', $speed = '', $callback = '')
+	{
+		return $this->js->_show($element, $speed, $callback);
+	}
+
+
+	// --------------------------------------------------------------------
+
+	/**
+	 * Compile
+	 *
+	 * gather together all script needing to be output
+	 *
+	 * @access	public
+	 * @param	string	The element to attach the event to
+	 * @return	string
+	 */	
+	function compile($view_var = 'script_foot', $script_tags = TRUE)
+	{
+		$this->js->_compile($view_var, $script_tags);
+	}
+	
+	/**
+	 * Clear Compile
+	 *
+	 * Clears any previous javascript collected for output
+	 *
+	 * @access	public
+	 * @return	void
+	 */
+	function clear_compile()
+	{
+		$this->js->_clear_compile();
+	}
+
+	// --------------------------------------------------------------------
+	
+	/**
+	 * External
+	 *
+	 * Outputs a <script> tag with the source as an external js file
+	 *
+	 * @access	public
+	 * @param	string	The element to attach the event to
+	 * @return	string
+	 */
+	function external($external_file = '', $relative = FALSE)
+	{
+		if ($external_file !== '')
+		{
+			$this->_javascript_location = $external_file;
+		}
+		else
+		{
+			if ($this->CI->config->item('javascript_location') != '')
+			{
+				$this->_javascript_location = $this->CI->config->item('javascript_location');
+			}		
+		}
+		
+		if ($relative === TRUE OR strncmp($external_file, 'http://', 7) == 0 OR strncmp($external_file, 'https://', 8) == 0)
+		{
+			$str = $this->_open_script($external_file);		
+		}
+		elseif (strpos($this->_javascript_location, 'http://') !== FALSE)
+		{
+			$str = $this->_open_script($this->_javascript_location.$external_file);		
+		}
+		else
+		{
+			$str = $this->_open_script($this->CI->config->slash_item('base_url').$this->_javascript_location.$external_file);
+		}
+
+		$str .= $this->_close_script();
+		return $str;
+	}
+  	
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Inline
+	 *
+	 * Outputs a <script> tag 
+	 *
+	 * @access	public
+	 * @param	string	The element to attach the event to
+	 * @param	boolean	If a CDATA section should be added
+	 * @return	string
+	 */
+	function inline($script, $cdata = TRUE)
+	{
+		$str = $this->_open_script();
+		$str .= ($cdata) ? "\n// <![CDATA[\n{$script}\n// ]]>\n" : "\n{$script}\n";
+		$str .= $this->_close_script();
+		
+		return $str;
+	}
+	  	
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Open Script
+	 *
+	 * Outputs an opening <script> 
+	 *
+	 * @access	private
+	 * @param	string	
+	 * @return	string
+	 */
+	function _open_script($src = '')
+	{
+		$str = '<script type="text/javascript" charset="'.strtolower($this->CI->config->item('charset')).'"';
+		$str .= ($src == '') ? '>' : ' src="'.$src.'">';
+		return $str;
+	}
+
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Close Script
+	 *
+	 * Outputs an closing </script> 
+	 *
+	 * @access	private
+	 * @param	string	
+	 * @return	string
+	 */
+	function _close_script($extra = "\n")
+	{
+		return "</script>$extra";
+	}
+	
+	
+	// --------------------------------------------------------------------
+	// --------------------------------------------------------------------
+	// AJAX-Y STUFF - still a testbed
+	// --------------------------------------------------------------------
+	// --------------------------------------------------------------------
+
+	/**
+	 * Update
+	 *
+	 * Outputs a javascript library slideDown event
+	 *
+	 * @access	public
+	 * @param	string	- element
+	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
+	 * @param	string	- Javascript callback function
+ 	 * @return	string
+	 */
+	function update($element = 'this', $speed = '', $callback = '')
+	{
+		return $this->js->_updater($element, $speed, $callback);
+	}
+	
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Generate JSON
+	 *
+	 * Can be passed a database result or associative array and returns a JSON formatted string
+	 *
+	 * @param	mixed	result set or array
+	 * @param	bool	match array types (defaults to objects)
+	 * @return	string	a json formatted string
+	 */
+	function generate_json($result = NULL, $match_array_type = FALSE)
+	{
+		// JSON data can optionally be passed to this function
+		// either as a database result object or an array, or a user supplied array
+		if ( ! is_null($result))
+		{
+			if (is_object($result))
+			{
+				$json_result = $result->result_array();
+			}
+			elseif (is_array($result))
+			{
+				$json_result = $result;
+			}
+			else
+			{
+				return $this->_prep_args($result);
+			}
+		}
+		else
+		{
+			return 'null';
+		}
+
+		$json = array();
+		$_is_assoc = TRUE;
+		
+		if ( ! is_array($json_result) AND empty($json_result))
+		{
+			show_error("Generate JSON Failed - Illegal key, value pair.");
+		}
+		elseif ($match_array_type)
+		{
+			$_is_assoc = $this->_is_associative_array($json_result);
+		}
+
+		foreach ($json_result as $k => $v)
+		{
+			if ($_is_assoc)
+			{
+				$json[] = $this->_prep_args($k, TRUE).':'.$this->generate_json($v, $match_array_type);
+			}
+			else
+			{
+				$json[] = $this->generate_json($v, $match_array_type);
+			}
+		}
+
+		$json = implode(',', $json);
+
+		return $_is_assoc ? "{".$json."}" : "[".$json."]";
+		
+	}
+	
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Is associative array
+	 *
+	 * Checks for an associative array
+	 *
+	 * @access	public
+	 * @param	type
+	 * @return	type
+	 */
+	function _is_associative_array($arr)
+	{
+		foreach (array_keys($arr) as $key => $val)
+		{
+			if ($key !== $val)
+			{
+				return TRUE;
+			}
+		}
+		
+		return FALSE;
+	}
+	
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Prep Args
+	 *
+	 * Ensures a standard json value and escapes values
+	 *
+	 * @access	public
+	 * @param	type
+	 * @return	type
+	 */
+	function _prep_args($result, $is_key = FALSE)
+	{
+		if (is_null($result))
+		{
+			return 'null';
+		}
+		elseif (is_bool($result))
+		{
+			return ($result === TRUE) ? 'true' : 'false';
+		}
+		elseif (is_string($result) OR $is_key)
+		{
+			return '"'.str_replace(array('\\', "\t", "\n", "\r", '"'), array('\\\\', '\\t', '\\n', "\\r", '\"'), $result).'"';
+		}
+		elseif (is_scalar($result))
+		{
+			return $result;
+		}
+	}
+}
+
+
+/* End of file Javascript.php */
+/* Location: ./system/libraries/Javascript.php */
\ No newline at end of file
diff --git a/system/libraries/Jquery.php b/system/libraries/Jquery.php
new file mode 100644
index 0000000..c63a742
--- /dev/null
+++ b/system/libraries/Jquery.php
@@ -0,0 +1,1071 @@
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+
+/**
+ * CodeIgniter
+ *
+ * An open source application development framework for PHP 4.3.2 or newer
+ *
+ * @package		CodeIgniter
+ * @author		ExpressionEngine Dev Team
+ * @copyright	Copyright (c) 2008 - 2010, EllisLab, Inc.
+ * @license		http://www.codeigniter.com/user_guide/license.html
+ * @link		http://www.codeigniter.com
+ * @since		Version 1.0
+ * @filesource
+ */
+
+/**
+ * Jquery Class
+ *
+ * @package		CodeIgniter
+ * @subpackage	Libraries
+ * @author		ExpressionEngine Dev Team
+ * @category	Loader
+ * @link		http://www.codeigniter.com/user_guide/libraries/jquery.html
+ */
+ 
+class Jquery extends CI_Javascript {
+
+	var $_javascript_folder = 'js';
+	var $jquery_code_for_load = array();
+	var $jquery_code_for_compile = array();
+	var $jquery_corner_active = FALSE;
+	var $jquery_table_sorter_active = FALSE;
+	var $jquery_table_sorter_pager_active = FALSE;
+	var $jquery_ajax_img = '';
+
+	function Jquery($params)
+	{
+		$this->CI =& get_instance();	
+		extract($params);
+
+		if ($autoload === TRUE)
+		{
+			$this->script();			
+		}
+		
+		log_message('debug', "Jquery Class Initialized");
+	}
+	
+	// --------------------------------------------------------------------	 
+	// Event Code
+	// --------------------------------------------------------------------	
+
+	/**
+	 * Blur
+	 *
+	 * Outputs a jQuery blur event
+	 *
+	 * @access	private
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function _blur($element = 'this', $js = '')
+	{
+		return $this->_add_event($element, $js, 'blur');
+	}
+	
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Change
+	 *
+	 * Outputs a jQuery change event
+	 *
+	 * @access	private
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function _change($element = 'this', $js = '')
+	{
+		return $this->_add_event($element, $js, 'change');
+	}
+	
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Click
+	 *
+	 * Outputs a jQuery click event
+	 *
+	 * @access	private
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @param	boolean	whether or not to return false
+	 * @return	string
+	 */
+	function _click($element = 'this', $js = '', $ret_false = TRUE)
+	{
+		if ( ! is_array($js))
+		{
+			$js = array($js);
+		}
+
+		if ($ret_false)
+		{
+			$js[] = "return false;";
+		}
+
+		return $this->_add_event($element, $js, 'click');
+	}
+
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Double Click
+	 *
+	 * Outputs a jQuery dblclick event
+	 *
+	 * @access	private
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function _dblclick($element = 'this', $js = '')
+	{
+		return $this->_add_event($element, $js, 'dblclick');
+	}
+
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Error
+	 *
+	 * Outputs a jQuery error event
+	 *
+	 * @access	private
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function _error($element = 'this', $js = '')
+	{
+		return $this->_add_event($element, $js, 'error');
+	}
+
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Focus
+	 *
+	 * Outputs a jQuery focus event
+	 *
+	 * @access	private
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function _focus($element = 'this', $js = '')
+	{
+		return $this->_add_event($element, $js, 'focus');
+	}
+
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Hover
+	 *
+	 * Outputs a jQuery hover event
+	 *
+	 * @access	private
+	 * @param	string	- element
+	 * @param	string	- Javascript code for mouse over
+	 * @param	string	- Javascript code for mouse out
+ 	 * @return	string
+	 */
+	function _hover($element = 'this', $over, $out)
+	{
+		$event = "\n\t$(" . $this->_prep_element($element) . ").hover(\n\t\tfunction()\n\t\t{\n\t\t\t{$over}\n\t\t}, \n\t\tfunction()\n\t\t{\n\t\t\t{$out}\n\t\t});\n";
+
+		$this->jquery_code_for_compile[] = $event;
+
+		return $event;
+	}
+
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Keydown
+	 *
+	 * Outputs a jQuery keydown event
+	 *
+	 * @access	private
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function _keydown($element = 'this', $js = '')
+	{
+		return $this->_add_event($element, $js, 'keydown');
+	}
+
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Keyup
+	 *
+	 * Outputs a jQuery keydown event
+	 *
+	 * @access	private
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function _keyup($element = 'this', $js = '')
+	{
+		return $this->_add_event($element, $js, 'keyup');
+	}	
+
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Load
+	 *
+	 * Outputs a jQuery load event
+	 *
+	 * @access	private
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function _load($element = 'this', $js = '')
+	{
+		return $this->_add_event($element, $js, 'load');
+	}	
+	
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Mousedown
+	 *
+	 * Outputs a jQuery mousedown event
+	 *
+	 * @access	private
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function _mousedown($element = 'this', $js = '')
+	{
+		return $this->_add_event($element, $js, 'mousedown');
+	}
+
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Mouse Out
+	 *
+	 * Outputs a jQuery mouseout event
+	 *
+	 * @access	private
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function _mouseout($element = 'this', $js = '')
+	{
+		return $this->_add_event($element, $js, 'mouseout');
+	}
+
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Mouse Over
+	 *
+	 * Outputs a jQuery mouseover event
+	 *
+	 * @access	private
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function _mouseover($element = 'this', $js = '')
+	{
+		return $this->_add_event($element, $js, 'mouseover');
+	}
+
+	// --------------------------------------------------------------------
+
+	/**
+	 * Mouseup
+	 *
+	 * Outputs a jQuery mouseup event
+	 *
+	 * @access	private
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function _mouseup($element = 'this', $js = '')
+	{
+		return $this->_add_event($element, $js, 'mouseup');
+	}
+
+	// --------------------------------------------------------------------
+
+	/**
+	 * Output
+	 *
+	 * Outputs script directly
+	 *
+	 * @access	private
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function _output($array_js = '')
+	{
+		if ( ! is_array($array_js))
+		{
+			$array_js = array($array_js);
+		}
+		
+		foreach ($array_js as $js)
+		{
+			$this->jquery_code_for_compile[] = "\t$js\n";
+		}
+	}
+
+	// --------------------------------------------------------------------
+
+	/**
+	 * Resize
+	 *
+	 * Outputs a jQuery resize event
+	 *
+	 * @access	private
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function _resize($element = 'this', $js = '')
+	{
+		return $this->_add_event($element, $js, 'resize');
+	}
+
+	// --------------------------------------------------------------------
+
+	/**
+	 * Scroll
+	 *
+	 * Outputs a jQuery scroll event
+	 *
+	 * @access	private
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function _scroll($element = 'this', $js = '')
+	{
+		return $this->_add_event($element, $js, 'scroll');
+	}
+	
+	// --------------------------------------------------------------------
+
+	/**
+	 * Unload
+	 *
+	 * Outputs a jQuery unload event
+	 *
+	 * @access	private
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @return	string
+	 */
+	function _unload($element = 'this', $js = '')
+	{
+		return $this->_add_event($element, $js, 'unload');
+	}
+
+	// --------------------------------------------------------------------	 
+	// Effects
+	// --------------------------------------------------------------------	
+	
+	/**
+	 * Add Class
+	 *
+	 * Outputs a jQuery addClass event
+	 *
+	 * @access	private
+	 * @param	string	- element
+ 	 * @return	string
+	 */
+	function _addClass($element = 'this', $class='')
+	{
+		$element = $this->_prep_element($element);
+		$str  = "$({$element}).addClass(\"$class\");";
+		return $str;
+	}
+
+	// --------------------------------------------------------------------
+
+	/**
+	 * Animate
+	 *
+	 * Outputs a jQuery animate event
+	 *
+	 * @access	private
+	 * @param	string	- element
+	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
+	 * @param	string	- Javascript callback function
+ 	 * @return	string
+	 */
+	function _animate($element = 'this', $params = array(), $speed = '', $extra = '')
+	{
+		$element = $this->_prep_element($element);
+		$speed = $this->_validate_speed($speed);
+		
+		$animations = "\t\t\t";
+		
+		foreach ($params as $param=>$value)
+		{
+			$animations .= $param.': \''.$value.'\', ';
+		}
+
+		$animations = substr($animations, 0, -2); // remove the last ", "
+
+		if ($speed != '')
+		{
+			$speed = ', '.$speed;
+		}
+		
+		if ($extra != '')
+		{
+			$extra = ', '.$extra;
+		}
+		
+		$str  = "$({$element}).animate({\n$animations\n\t\t}".$speed.$extra.");";
+		
+		return $str;
+	}
+
+	// --------------------------------------------------------------------
+		
+	/**
+	 * Fade In
+	 *
+	 * Outputs a jQuery hide event
+	 *
+	 * @access	private
+	 * @param	string	- element
+	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
+	 * @param	string	- Javascript callback function
+ 	 * @return	string
+	 */
+	function _fadeIn($element = 'this', $speed = '', $callback = '')
+	{
+		$element = $this->_prep_element($element);	
+		$speed = $this->_validate_speed($speed);
+		
+		if ($callback != '')
+		{
+			$callback = ", function(){\n{$callback}\n}";
+		}
+		
+		$str  = "$({$element}).fadeIn({$speed}{$callback});";
+		
+		return $str;
+	}
+		
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Fade Out
+	 *
+	 * Outputs a jQuery hide event
+	 *
+	 * @access	private
+	 * @param	string	- element
+	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
+	 * @param	string	- Javascript callback function
+ 	 * @return	string
+	 */
+	function _fadeOut($element = 'this', $speed = '', $callback = '')
+	{
+		$element = $this->_prep_element($element);
+		$speed = $this->_validate_speed($speed);
+		
+		if ($callback != '')
+		{
+			$callback = ", function(){\n{$callback}\n}";
+		}
+		
+		$str  = "$({$element}).fadeOut({$speed}{$callback});";
+		
+		return $str;
+	}
+
+	// --------------------------------------------------------------------
+
+	/**
+	 * Hide
+	 *
+	 * Outputs a jQuery hide action
+	 *
+	 * @access	private
+	 * @param	string	- element
+	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
+	 * @param	string	- Javascript callback function
+ 	 * @return	string
+	 */
+	function _hide($element = 'this', $speed = '', $callback = '')
+	{
+		$element = $this->_prep_element($element);	
+		$speed = $this->_validate_speed($speed);
+		
+		if ($callback != '')
+		{
+			$callback = ", function(){\n{$callback}\n}";
+		}
+		
+		$str  = "$({$element}).hide({$speed}{$callback});";
+
+		return $str;
+	}
+	
+	// --------------------------------------------------------------------
+
+	/**
+	 * Remove Class
+	 *
+	 * Outputs a jQuery remove class event
+	 *
+	 * @access	private
+	 * @param	string	- element
+ 	 * @return	string
+	 */
+	function _removeClass($element = 'this', $class='')
+	{
+		$element = $this->_prep_element($element);
+		$str  = "$({$element}).removeClass(\"$class\");";
+		return $str;
+	}
+
+	// --------------------------------------------------------------------
+			
+	/**
+	 * Slide Up
+	 *
+	 * Outputs a jQuery slideUp event
+	 *
+	 * @access	private
+	 * @param	string	- element
+	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
+	 * @param	string	- Javascript callback function
+ 	 * @return	string
+	 */
+	function _slideUp($element = 'this', $speed = '', $callback = '')
+	{
+		$element = $this->_prep_element($element);	
+		$speed = $this->_validate_speed($speed);
+		
+		if ($callback != '')
+		{
+			$callback = ", function(){\n{$callback}\n}";
+		}
+		
+		$str  = "$({$element}).slideUp({$speed}{$callback});";
+		
+		return $str;
+	}
+		
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Slide Down
+	 *
+	 * Outputs a jQuery slideDown event
+	 *
+	 * @access	private
+	 * @param	string	- element
+	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
+	 * @param	string	- Javascript callback function
+ 	 * @return	string
+	 */
+	function _slideDown($element = 'this', $speed = '', $callback = '')
+	{
+		$element = $this->_prep_element($element);
+		$speed = $this->_validate_speed($speed);
+		
+		if ($callback != '')
+		{
+			$callback = ", function(){\n{$callback}\n}";
+		}
+		
+		$str  = "$({$element}).slideDown({$speed}{$callback});";
+		
+		return $str;
+	}
+
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Slide Toggle
+	 *
+	 * Outputs a jQuery slideToggle event
+	 *
+	 * @access	public
+	 * @param	string	- element
+	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
+	 * @param	string	- Javascript callback function
+ 	 * @return	string
+	 */
+	function _slideToggle($element = 'this', $speed = '', $callback = '')
+	{
+		$element = $this->_prep_element($element);
+		$speed = $this->_validate_speed($speed);
+		
+		if ($callback != '')
+		{
+			$callback = ", function(){\n{$callback}\n}";
+		}
+		
+		$str  = "$({$element}).slideToggle({$speed}{$callback});";
+		
+		return $str;
+	}
+		
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Toggle
+	 *
+	 * Outputs a jQuery toggle event
+	 *
+	 * @access	private
+	 * @param	string	- element
+ 	 * @return	string
+	 */
+	function _toggle($element = 'this')
+	{
+		$element = $this->_prep_element($element);
+		$str  = "$({$element}).toggle();";
+		return $str;
+	}
+	
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Toggle Class
+	 *
+	 * Outputs a jQuery toggle class event
+	 *
+	 * @access	private
+	 * @param	string	- element
+ 	 * @return	string
+	 */
+	function _toggleClass($element = 'this', $class='')
+	{
+		$element = $this->_prep_element($element);
+		$str  = "$({$element}).toggleClass(\"$class\");";
+		return $str;
+	}
+	
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Show
+	 *
+	 * Outputs a jQuery show event
+	 *
+	 * @access	private
+	 * @param	string	- element
+	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
+	 * @param	string	- Javascript callback function
+ 	 * @return	string
+	 */
+	function _show($element = 'this', $speed = '', $callback = '')
+	{
+		$element = $this->_prep_element($element);	
+		$speed = $this->_validate_speed($speed);
+		
+		if ($callback != '')
+		{
+			$callback = ", function(){\n{$callback}\n}";
+		}
+		
+		$str  = "$({$element}).show({$speed}{$callback});";
+		
+		return $str;
+	}
+
+	// --------------------------------------------------------------------
+
+	/**
+	 * Updater
+	 *
+	 * An Ajax call that populates the designated DOM node with 
+	 * returned content
+	 *
+	 * @access	private
+	 * @param	string	The element to attach the event to
+	 * @param	string	the controller to run the call against
+	 * @param	string	optional parameters
+	 * @return	string
+	 */
+	
+	function _updater($container = 'this', $controller, $options = '')
+	{	
+		$container = $this->_prep_element($container);
+		
+		$controller = (strpos('://', $controller) === FALSE) ? $controller : $this->CI->config->site_url($controller);
+		
+		// ajaxStart and ajaxStop are better choices here... but this is a stop gap
+		if ($this->CI->config->item('javascript_ajax_img') == '')
+		{
+			$loading_notifier = "Loading...";
+		}
+		else
+		{
+			$loading_notifier = '<img src=\'' . $this->CI->config->slash_item('base_url') . $this->CI->config->item('javascript_ajax_img') . '\' alt=\'Loading\' />';
+		}
+		
+		$updater = "$($container).empty();\n"; // anything that was in... get it out
+		$updater .= "\t\t$($container).prepend(\"$loading_notifier\");\n"; // to replace with an image
+
+		$request_options = '';
+		if ($options != '')
+		{
+			$request_options .= ", {";
+			$request_options .= (is_array($options)) ? "'".implode("', '", $options)."'" : "'".str_replace(":", "':'", $options)."'";
+			$request_options .= "}";
+		}
+
+		$updater .= "\t\t$($container).load('$controller'$request_options);";
+		return $updater;
+	}
+
+
+	// --------------------------------------------------------------------
+	// Pre-written handy stuff
+	// --------------------------------------------------------------------
+	 
+	/**
+	 * Zebra tables
+	 *
+	 * @access	private
+	 * @param	string	table name
+	 * @param	string	plugin location
+	 * @return	string
+	 */
+	function _zebraTables($class = '', $odd = 'odd', $hover = '')
+	{
+		$class = ($class != '') ? '.'.$class : '';
+		
+		$zebra  = "\t\$(\"table{$class} tbody tr:nth-child(even)\").addClass(\"{$odd}\");";
+
+		$this->jquery_code_for_compile[] = $zebra;
+
+		if ($hover != '')
+		{
+			$hover = $this->hover("table{$class} tbody tr", "$(this).addClass('hover');", "$(this).removeClass('hover');");
+		}
+
+		return $zebra;
+	}
+
+
+
+	// --------------------------------------------------------------------
+	// Plugins
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Corner Plugin
+	 *
+	 * http://www.malsup.com/jquery/corner/
+	 *
+	 * @access	public
+	 * @param	string	target
+	 * @return	string
+	 */
+	function corner($element = '', $corner_style = '')
+	{
+		// may want to make this configurable down the road
+		$corner_location = '/plugins/jquery.corner.js';
+
+		if ($corner_style != '')
+		{
+			$corner_style = '"'.$corner_style.'"';
+		}
+
+		return "$(" . $this->_prep_element($element) . ").corner(".$corner_style.");";
+	}
+	
+	// --------------------------------------------------------------------
+
+	/**
+	 * modal window
+	 *
+	 * Load a thickbox modal window
+	 *
+	 * @access	public
+	 * @return	void
+	 */
+	function modal($src, $relative = FALSE)
+	{	
+		$this->jquery_code_for_load[] = $this->external($src, $relative);
+	}
+
+	// --------------------------------------------------------------------
+
+	/**
+	 * Effect
+	 *
+	 * Load an Effect library
+	 *
+	 * @access	public
+	 * @return	void
+	 */
+	function effect($src, $relative = FALSE)
+	{
+		$this->jquery_code_for_load[] = $this->external($src, $relative);
+	}
+
+	// --------------------------------------------------------------------
+
+	/**
+	 * Plugin
+	 *
+	 * Load a plugin library
+	 *
+	 * @access	public
+	 * @return	void
+	 */
+	function plugin($src, $relative = FALSE)
+	{
+		$this->jquery_code_for_load[] = $this->external($src, $relative);
+	}
+
+	// --------------------------------------------------------------------
+
+	/**
+	 * UI
+	 *
+	 * Load a user interface library
+	 *
+	 * @access	public
+	 * @return	void
+	 */
+	function ui($src, $relative = FALSE)
+	{
+		$this->jquery_code_for_load[] = $this->external($src, $relative);
+	}
+	// --------------------------------------------------------------------
+
+	/**
+	 * Sortable
+	 *
+	 * Creates a jQuery sortable
+	 *
+	 * @access	public
+	 * @return	void
+	 */
+	function sortable($element, $options = array())
+	{
+
+		if (count($options) > 0)
+		{
+			$sort_options = array();
+			foreach ($options as $k=>$v)
+			{
+				$sort_options[] = "\n\t\t".$k.': '.$v."";
+			}
+			$sort_options = implode(",", $sort_options);
+		}
+		else
+		{
+			$sort_options = '';
+		}
+
+		return "$(" . $this->_prep_element($element) . ").sortable({".$sort_options."\n\t});";
+	}
+
+	// --------------------------------------------------------------------
+		 
+	/**
+	 * Table Sorter Plugin
+	 *
+	 * @access	public
+	 * @param	string	table name
+	 * @param	string	plugin location
+	 * @return	string
+	 */
+	function tablesorter($table = '', $options = '')
+	{
+		$this->jquery_code_for_compile[] = "\t$(" . $this->_prep_element($table) . ").tablesorter($options);\n";
+	}
+	
+	// --------------------------------------------------------------------
+	// Class functions
+	// --------------------------------------------------------------------
+
+	/**
+	 * Add Event
+	 *
+	 * Constructs the syntax for an event, and adds to into the array for compilation
+	 *
+	 * @access	private
+	 * @param	string	The element to attach the event to
+	 * @param	string	The code to execute
+	 * @param	string	The event to pass
+	 * @return	string
+	 */	
+	function _add_event($element, $js, $event)
+	{
+		if (is_array($js))
+		{
+			$js = implode("\n\t\t", $js);
+
+		}
+
+		$event = "\n\t$(" . $this->_prep_element($element) . ").{$event}(function(){\n\t\t{$js}\n\t});\n";
+		$this->jquery_code_for_compile[] = $event;
+		return $event;
+	}
+
+	// --------------------------------------------------------------------
+
+	/**
+	 * Compile
+	 *
+	 * As events are specified, they are stored in an array
+	 * This funciton compiles them all for output on a page
+	 *
+	 * @access	private
+	 * @return	string
+	 */
+	function _compile($view_var = 'script_foot', $script_tags = TRUE)
+	{
+		// External references
+		$external_scripts = implode('', $this->jquery_code_for_load);
+		$this->CI->load->vars(array('library_src' => $external_scripts));
+
+		if (count($this->jquery_code_for_compile) == 0 )
+		{
+			// no inline references, let's just return
+			return;
+		}
+
+		// Inline references
+		$script = '$(document).ready(function() {' . "\n";
+		$script .= implode('', $this->jquery_code_for_compile);
+		$script .= '});';
+		
+		$output = ($script_tags === FALSE) ? $script : $this->inline($script);
+
+		$this->CI->load->vars(array($view_var => $output));
+
+	}
+	
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Clear Compile
+	 *
+	 * Clears the array of script events collected for output
+	 *
+	 * @access	public
+	 * @return	void
+	 */
+	function _clear_compile()
+	{
+		$this->jquery_code_for_compile = array();
+	}
+
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Document Ready
+	 *
+	 * A wrapper for writing document.ready()
+	 *
+	 * @access	private
+	 * @return	string
+	 */
+	function _document_ready($js)
+	{
+		if ( ! is_array($js))
+		{
+			$js = array ($js);
+
+		}
+		
+		foreach ($js as $script)
+		{
+			$this->jquery_code_for_compile[] = $script;
+		}
+	}
+
+	// --------------------------------------------------------------------
+
+	/**
+	 * Script Tag
+	 *
+	 * Outputs the script tag that loads the jquery.js file into an HTML document
+	 *
+	 * @access	public
+	 * @param	string
+	 * @return	string
+	 */
+	function script($library_src = '', $relative = FALSE)
+	{
+		$library_src = $this->external($library_src, $relative);
+		$this->jquery_code_for_load[] = $library_src;
+		return $library_src;
+	}
+	
+	// --------------------------------------------------------------------
+
+	/**
+	 * Prep Element
+	 *
+	 * Puts HTML element in quotes for use in jQuery code
+	 * unless the supplied element is the Javascript 'this'
+	 * object, in which case no quotes are added
+	 *
+	 * @access	public
+	 * @param	string
+	 * @return	string
+	 */
+	function _prep_element($element)
+	{
+		if ($element != 'this')
+		{
+			$element = '"'.$element.'"';
+		}
+		
+		return $element;
+	}
+	
+	// --------------------------------------------------------------------
+
+	/**
+	 * Validate Speed
+	 *
+	 * Ensures the speed parameter is valid for jQuery
+	 *
+	 * @access	private
+	 * @param	string
+	 * @return	string
+	 */	
+	function _validate_speed($speed)
+	{
+		if (in_array($speed, array('slow', 'normal', 'fast')))
+		{
+			$speed = '"'.$speed.'"';
+		}
+		elseif (preg_match("/[^0-9]/", $speed))
+		{
+			$speed = '';
+		}
+	
+		return $speed;
+	}
+
+}
+
+/* End of file Jquery.php */
+/* Location: ./system/libraries/Jquery.php */
\ No newline at end of file
